package com.molichuxing.services.infrastructure.service.impl;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

import com.molichuxing.services.infrastructure.bean.OfflineBookyueBean;
import com.molichuxing.services.infrastructure.convertor.Convert;
import com.molichuxing.services.infrastructure.dao.OfflineBookyueMapper;
import com.molichuxing.services.infrastructure.dto.request.create.OfflineBookyueCreateDto;
import com.molichuxing.services.infrastructure.dto.response.OfflineBookyueDto;
import com.molichuxing.services.infrastructure.service.OfflineBookyueService;

/**
 * 专属订单-订悦线下支付
 * 
 * @author zoumingyu
 * @date 2019年11月25日
 *
 */
@Service("offlineBookyueService")
public class OfflineBookyueServiceImpl implements OfflineBookyueService {
	private static final Logger logger = LoggerFactory.getLogger(OfflineBookyueServiceImpl.class);

	@Resource
	private OfflineBookyueMapper offlineBookyueMapper;

	/**
	 * 新增
	 * 
	 * @param createDto
	 * @return
	 */
	@Override
	public boolean create(OfflineBookyueCreateDto createDto) {
		offlineBookyueMapper.create(Convert.toOfflineBookyueBean(createDto));
		return true;
	}
	
	/**
	 * 根据订单编号 查询费用信息
	 * @param orderCode
	 * @return
	 */
	@Override
	public OfflineBookyueDto getByOrderCode(Long orderCode) {
		OfflineBookyueBean bean=offlineBookyueMapper.getByOrderCode(orderCode);
		return Convert.toOfflineBookyueDto(bean);
	}

}
